﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Kitware.VTK;
using System.Threading;

namespace BS_2.VTKClass
{
    public class ContourZone
    {
        public ZoneData zoneData;
        public ContourZone(ZoneData zoneData)
        {
            this.zoneData = zoneData;
            this.xyzLen = zoneData.ijk;
            zones = new List<Zone>();
            getfacePoint(zoneData);
        }


        //所有面域集合
        public List<Zone> zones;
        //边界值
        float[] valLimits;
        private float maxx, maxy, maxz, minx, miny, minz;
        float[] xyzLen;
        public float[] getXYZLen()
        {
            return xyzLen;
        }

        public float[] getValLimits()
        {
            return valLimits;
        }

        private void getfacePoint(ZoneData zoneData)
        {

            maxx = zoneData.centerX_LS.Max();

            minx = zoneData.centerX_LS.Min();


            maxy = zoneData.centerY_LS.Max();

            miny = zoneData.centerY_LS.Min();


            maxz = zoneData.centerZ_LS.Max();
            minz = zoneData.centerZ_LS.Min();
            valLimits = new float[] { maxx, minx, maxy, miny, maxz, minz };

        }

    }
}
